package com.asiainfo.sqlextractor.util;

public class JavaTypeResolve {

    public static Class<?> resolveJavaType(String type) {
        try {
            return Class.forName(type);
        } catch (ClassNotFoundException e) {
            try {
                return Class.forName("java.lang." + type);
            } catch (ClassNotFoundException ex) {
                throw new IllegalArgumentException(type + " type has error!", ex);
            }
        }
    }
}
